package com.jd.dlc.spi;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @program: dlc
 * @ClassName SPILoader
 * @description: SPI loader
 * @author: sizegang
 **/
public class SPILoader {
    Logger logger = LoggerFactory.getLogger(SPILoader.class);

    public static ExtensionLoader EXTENSION_LOADER = new ExtensionLoader();

    public void initialize(Class clz) {
        //初始化路由策略
        try {
            EXTENSION_LOADER.loadExtension(clz);
        } catch (Exception e) {
            logger.error("DLC SPI loaded error{}", e);
        }
    }

}
